home *** CD-ROM | disk | FTP | other *** search
- Subject: FW_CContent and Selections
- Sent: 7/10/96 2:21 PM
- Received: 7/10/96 2:41 PM
- From: Victor Langelo, victor@eclipse.cpcn.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
-
- FW_CContent and Selections
- 7/10/96 2:43 PM
- I would argue against too many frameworked defined Notification
- classes, unless they are used explicitly by the framework. The users
- content model will seldom be a simple as the example parts.
-
- FW_CContent has a compiler generated default copy constructor.
- Hopefully, the ODF team will and an explicit one when it becomes
- necessary. Any subclasses can define one as needed. Since there
- is only one data member in FW_CContent, it hardly makes sense
- and hurts compiler optimization to add one.
-
- Besides, if your part has a lot of data, making a copy of the entire
- content is not a useful way to save the undo state.
-
- This leads me to another problem. It is difficult for us to support
- undo with the current interface to FW_CSelection::ClearSelection.
- We really need another parameter, preferrably a FW_CContent*.
- I realize that could be NULL in the default case, but we have an
- error prone work-around of setting the undo context for each
- possible ClearSelection from the framework base commands. If
- the commands keep an undo content pointer, which would be set by
- subclasses and then passed it in each ClearSelection message, it
- would be a big improvement.
-
- --------------------------------------
- From: Hewitt-Jon
-
- o More notification classes would be useful, i.e. FW_CBecameTargetNotification,
- FW_CResignedTargetNotification, FW_CEditViewChangedNotification, etc.
-
- o It seems like it would be useful to be able to copy and assign content
- objects. For example, if you want to be able to undo a drop of a part of the
- same type, a command class could just retain a copy of the content as the saved
- data. FW_Content lacks an explicit copy constructor and assignment operator.
- The compiler generated versions look safe to use for the current class but that
- is no guarantee that they will remain safe. Does it make sense to add an
- explicit copy constructor and assignment operator? Or should I use a
- stream/archiving to duplicate the content's data?
-
-
-
-
-